<template>
  <view class="second-container">
    <image class="logo-img" src="/static/sendLogo.png" mode="aspectFit" />
    <view class="main-title">您是否已有账号？</view>
    <view class="sub-title">已有账号可直接登录，否则请先注册</view>
    <button class="second-btn green" @click="goLogin">已有账号，去登录</button>
    <button class="second-btn primary" @click="goRegister">去注册</button>
  </view>
</template>

<script>
export default {
  methods: {
    goLogin() {
      uni.navigateTo({ 
        url: '/pages/login/courierLogin',
        fail: (err) => {
          console.error('跳转失败:', err);
          uni.showToast({
            title: '跳转失败',
            icon: 'none'
          });
        }
      });
    },
    goRegister() {
      uni.navigateTo({ 
        url: '/pages/register/courierRegister',
        fail: (err) => {
          console.error('跳转失败:', err);
          uni.showToast({
            title: '跳转失败',
            icon: 'none'
          });
        }
      });
    }
  }
}
</script>

<style>
.second-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  padding: 0 20px;
}
.logo-img {
  width: 100px;
  height: 100px;
  margin-bottom: 40px;
}
.main-title {
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 16px;
  color: #222;
}
.sub-title {
  color: #888;
  font-size: 16px;
  margin-bottom: 48px;
}
.second-btn {
  width: 70%;
  margin: 14px 0;
  background: #bcbcbc;
  color: #fff;
  font-size: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 8px #e0e0e0;
  padding: 12px 0;
  letter-spacing: 1px;
  border: none;
  outline: none;
  transition: background 0.2s;
}
.second-btn.primary {
  background: #007aff;
}
.second-btn.green {
  background: #27ae60;
}
</style> 